<%@ page contentType="text/html; charset=utf-8" import="java.util.*,common.*"%>
<%

//	String dong = CommonUtil.nvl((String)request.getParameter("dong"));	
//	String can_yn = (String)request.getAttribute("result");

//	System.out.println("dong ==> "+dong+" ,  can_yn ==> "+can_yn);
	
	HashMap listMap=(HashMap)request.getAttribute("list_map");
	HashMap map = null;
	ArrayList list=null;
	
	if (listMap!=null){
		list=(ArrayList)listMap.get("mainContent");
	}
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="ko">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>주소찾기</title>
<link href="/common/general.css" rel="stylesheet" type="text/css">
<script type="text/JavaScript">
<!--
function go_set(post1, post2, addr){
	opener.set_post(post1, post2, addr);
	self.close();    	
}

function go_check(){
	frm=document.form1;
	if(frm.i_dong.value=="" || frm.i_dong.value==null){
		alert("먼저 동 이름을 입력하세요.");
		return;
	}
	frm.cmd.value="address_list";
	frm.dong.value=frm.i_dong.value;
	frm.action="speaking.pb";
	frm.method="post";
	frm.target="_self";
	frm.submit();
}
function checkkey(){
	if ( event.keyCode == 13 ) {
		go_check();
	}  //  입력창에 커서가 위치되어 있을때 Enter를 치면 수행
}
//-->
</script>
</head>

<body >
<form name="form1"  method="post">
<input type="hidden" name="id_confirm" value="">
<input type="hidden" name="dong" value="">
<input type="hidden" name="cmd" value="">

<img src="images/pop_zipcode.gif" alt="우편번호찾기" class="pd_T20 pd_L20">

<!--우편번호찾기-->
<div class="pd_T20 pd_B20 pd_L20" style="line-height:18px;">

  <table width="100%"  cellspacing="0" cellpadding="0" class="tblPop">
    <caption>
    우편번호찾기
    </caption>
    <col width="100px" />
    <col width="150px" />
    <col width="100px" />
    <col width="150px" />
    
    <tr>
      <td class="front">입력할 지역의 동이나 읍/면의 이름을 빈칸 없이 입력하세요.<br>
      (예: 서초동, 역삼동, 계산면)</td>
    </tr>
    <tr>
      <td style="padding:10px;">
      
      <span class="f_L"  style="width:200px; padding-right:10px;">
      <input type="text" name="i_dong" style="width:200px;" onKeypress="javascript:checkkey()">  
      </span>
      
      <span class="f_L">   
      <a href="javascript:go_check()"><img src="images/btn_zipSearch.gif" alt="우편번호 찾기"></a>
      </span>
      
      </td>
    </tr>    
    <tr>
      <td>
    <% if (list!=null && 0<list.size()){ %>  
      <div class="pd_T10" style="height:150px; overflow-x:hidden; overflow-y:auto; margin:10px 15px 5px 0px; padding-left:10px;<% if (list==null || 1>list.size()){ %>height:235px;<% } %> ">
      
          <strong>* 아래 목록에서 원하는 주소를 선택해 주세요.</strong><br /><br />
<%
	for (int i=0;list!=null && i<list.size();i++){
		map=(HashMap)list.get(i);
%>	          
          <span class="f_L pd_R10"><%=map.get("post1")%>&nbsp;-&nbsp;<%=map.get("post2")%> &nbsp; <%=map.get("post_address")%></span>
          <span class="f_L">   
          <a href="javascript:go_set('<%=map.get("post1")%>','<%=map.get("post2")%>','<%=map.get("post_address")%>')"><img src="images/btn_zipselect.gif" alt="선택"></a></span>
          <br /><br />
 <% } %>          
          
          </div>
<% } %>          
        </td>
    </tr>
  </table>
  
<!--버튼-->
    <div style="clear:both; float:left; text-align:center; width:465px; padding-bottom:10px;"><a href="javascript:self.close();"><img src="images/btn_close.gif" alt="닫기">
    </a>    </div>   
  <!--버튼//-->        
  
  </div>

<!--우편번호찾기//-->


</form>
<iframe name='hide_src'  width='0' height='0' SCROLLING='AUTO' frameborder='0'></iframe>
</body>
</html>
